import request from '@/router/axios';

// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 获取详情
export const getDetail = (id) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 删除
export const remove = (ids) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

// 新增
export const add = (row) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/submit',
    method: 'post',
    data: row
  })
}

// 修改
export const update = (row) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/update',
    method: 'post',
    data: row
  })
}

// 断开监控
export const disConnectDcs = (ids) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/disconnectOrStartMonitoring',
    method: 'post',
    params: {
      "ids": ids,
      "val": "0"
    }
  })
}

// 同步监控信息
export const synMonitorDcs = (ids) => {
  return request({
    url: '/api/configuration/dcsdatasiteinfo/disconnectOrStartMonitoring',
    method: 'post',
    params: {
      "ids": ids,
      "val": "1"
    }
  })
}